package it.polimi.traveldream.web;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import javax.faces.context.FacesContext;


@ManagedBean(name="logoutBean")
@RequestScoped
public class LogoutBean {
	
	public String logout(){
		System.out.print("ciao1 sjkdsdj");
	    FacesContext.getCurrentInstance().getExternalContext().invalidateSession();
	    System.out.print("ciao sjkdsdj");
	    return "/home?faces-redirect=true";
	  }


}
